<?
if(!ANTIHACK) die("ANTIHACK...");
include_once(INCLUDES."buildlink.php");
include_once(INCLUDES."paging.php");
include_once(INCLUDES."split_unicode.php");

$table="post";
$code=$_GET['code'];
$total=0;$start=0;$limit=30;
$where="tags like'%$code%'";
$listpage= paging($table,$where,$_GET,$total,$start,$limit,5);
//lay danh sach bai post
$q=query("select * from $table where $where order by time desc limit $start,$limit");
while($r=fetch($q))
{
			$r["time"]= date("H:i m/m/Y",$r["time"]);
			$r["link"]=buildlink("post",$r,"",1);
			$r["described"]=split_unicode($r["described"],200);
			$r["parentName"]=$parentName;
			$data1[]=$r;
}
$link="http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$smarty->assign("link",$link);
$smarty->assign("WordsTags",$code);
$smarty->assign("listpage",$listpage);
$smarty->assign("curpage",$_GET["page"]);
$smarty->assign("data1",$data1);
$smarty->display("tags.htm");
?>